import { createStore } from 'vuex'
// import createLogger from 'vuex/dist/logger'

import state from './state'
import getters from './getters'
import mutations from './mutations'
import actions from './actions'

import homeModules from 'components/home/store'
import realtimeNwdlModules from 'components/realtimeNwdl/store'

const isDev = process.env.NODE_ENV === 'development'

const store = createStore({
  strict: isDev,
  state,
  getters,
  mutations,
  actions,
  // plugins: isDev ? [createLogger()] : [],
  modules: {
    home: homeModules,
    realtimeNwdl: realtimeNwdlModules
  }
})

export default store
